<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><s:property value="#session.access"/></title>
<meta name="viewport" content="width=device-width,inital-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta name="format-detection" content="telephone=no,email=no,adress=no">
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath() %>/css/bootstrap.css" type="text/css" rel="stylesheet"/>
<link href="<%=request.getContextPath() %>/css/bootstrap-responsive.css" type="text/css" rel="stylesheet"/>
<link href="<%=request.getContextPath() %>/js/date/skin/WdatePicker.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/bootstrap.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/date/WdatePicker.js"></script>
<script type="text/javascript">

</script>
</head>
<body>
	<div class="container">
		
		<s:action name="global_menu"  executeResult="true"></s:action>
		
		<div class="row">
			<div class="span12">
					<ul class="breadcrumb">
						<li>
							<a href="javascript:void(0)">首页</a> <span class="divider">/</span>
						</li>
						<li>
							<a href="javascript:void(0)">交易管理</a> <span class="divider">/</span>
						</li>
						<li class="active">
							交易列表
						</li>
					</ul>
					
					<h4>
						交易明细
					</h4>
					
					<form id="sform" action="transaction_view.html" method="get" enctype="multipart/form-data">
						<table>
							<tr>
								<td height="40">
									<s:textfield  id="txnNo" name="txnNo" placeholder="交易流水号"></s:textfield>
									<s:textfield  id="txnOrder" name="txnOrder" placeholder="订单号"></s:textfield>
									<s:textfield  id="txnSite" name="txnSite" placeholder="来源网站"></s:textfield>
									<s:textfield  id="txnDateTop"  name="txnDateTop" placeholder="发生日期起"  onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="txnDateTop" format="yyyy-MM-dd"/></s:param></s:textfield>
									 - 
									<s:textfield  id="txnDateEnd"  name="txnDateEnd" placeholder="发生日期止"  onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="txnDateEnd" format="yyyy-MM-dd"/></s:param></s:textfield>
									<input type="button"    class="btn btn-primary"  value="查询" onclick="sform.submit();"/>
									<input type="button"    class="btn"  value="高级搜索" onclick="$('.condition').toggle();"/>
								</td>
							</tr>
							<tr class="condition" style="display: none;">
								<td height="40">
									<s:select cssStyle="width:120px;" id="txnRefund" name="txnRefund" list="#{'1':'是','0':'否'}" headerKey="" headerValue="退款状态"/>
									<s:select cssStyle="width:120px;" id="txnRefuse" name="txnRefuse" list="#{'1':'是','0':'否'}" headerKey="" headerValue="拒付状态"/>
									<s:select cssStyle="width:120px;" id="txnFreeze" name="txnFreeze" list="#{'1':'是','0':'否'}" headerKey="" headerValue="冻结状态"/>
									<s:select cssStyle="width:120px;" id="txnLogic" name="txnLogic" list="#{'1':'是','0':'否'}" headerKey="" headerValue="发货状态"/>
									<s:select cssStyle="width:120px;" id="txnSettle" name="txnSettle" list="#{'1':'是','0':'否'}" headerKey="" headerValue="结算状态"/>
									<s:select cssStyle="width:120px;" id="txnDanger" name="txnDanger" list="#{'1':'是','0':'否'}" headerKey="" headerValue="风险状态"/>
									<s:select cssStyle="width:120px;" id="txnState" name="txnState" list="#{'1':'是','0':'否'}" headerKey="" headerValue="付款状态"/>
								</td>
							</tr>
							<tr class="condition" style="display: none;">
								<td height="40">
									<s:select id="crdType" name="crdType" list="@dicts.CardDict@CARD_LIST" headerKey="" headerValue="卡类型"/>
									<s:textfield  id="crdNumber" name="crdNumber" placeholder="卡号" cssStyle="width:240px;" ></s:textfield>
									<s:textfield  id="crdIp" name="crdIp" placeholder="ip地址" cssStyle="width:240px;" ></s:textfield>
									<s:textfield  id="crdCode" name="crdCode" placeholder="ip国家码" cssStyle="width:100px;" ></s:textfield>
									<s:textfield  id="crdBin" name="crdBin" placeholder="bin国家码" cssStyle="width:100px;" ></s:textfield>
								</td>
							</tr>
							<tr class="condition" style="display: none;">
								<td height="40">
									<s:textfield  id="crdCfname" name="crdCfname" placeholder="收货人姓" cssStyle="width:100px;" ></s:textfield> - <s:textfield  id="crdClname" name="crdClname" placeholder="收货人名" cssStyle="width:100px;" ></s:textfield>
									<s:textfield  id="crdCphone" name="crdCphone" placeholder="电话" cssStyle="width:160px;" ></s:textfield>
									<s:textfield  id="crdCemail" name="crdCemail" placeholder="邮箱" cssStyle="width:240px;"></s:textfield>
									<s:textfield  id="crdCcountry" name="crdCcountry" placeholder="国家" cssStyle="width:100px;" ></s:textfield>
									<s:textfield  id="crdCstate" name="crdCstate" placeholder="州/省" cssStyle="width:100px;" ></s:textfield>
									<s:textfield  id="crdCcity" name="crdCcity" placeholder="城市" cssStyle="width:100px;" ></s:textfield>
								</td>
							</tr>
							<tr class="condition" style="display: none;">
								<td height="40">
									<s:textfield  id="crdHfname" name="crdHfname" placeholder="持卡人姓" cssStyle="width:100px;" ></s:textfield> - <s:textfield  id="crdHlname" name="crdHlname" placeholder="持卡人名" cssStyle="width:100px;" ></s:textfield>
									<s:textfield  id="crdHphone" name="crdHphone" placeholder="电话" cssStyle="width:160px;" ></s:textfield>
									<s:textfield  id="crdHemail" name="crdHemail" placeholder="邮箱" cssStyle="width:240px;"></s:textfield>
									<s:textfield  id="crdHcountry" name="crdHcountry" placeholder="国家" cssStyle="width:100px;" ></s:textfield>
									<s:textfield  id="crdHstate" name="crdHstate" placeholder="州/省" cssStyle="width:100px;" ></s:textfield>
									<s:textfield  id="crdHcity" name="crdHcity" placeholder="城市" cssStyle="width:100px;" ></s:textfield>
								</td>
							</tr>
							<tr >
								<td height="40">
									<input type="button" class="btn btn-primary"    value="导出数据"  onclick="$.MsgBox.Confirm('提示', '导出数据条数限制不能超过<s:property value="@common.CommonDict@EXPORT_LIMIT"/>条,确认导出吗?', function(){window.open(location.href.replace('view','educe'));});" />
									
									&nbsp;&nbsp;&nbsp;&nbsp;
									<input type="button" class="btn"  value="编号排序" onclick="toSort('sortField','txnNo')"/>
									<input type="button" class="btn"  value="日期排序" onclick="toSort('sortField','txnDate')"/>	
									
									&nbsp;&nbsp;&nbsp;&nbsp;
									<input type="button" class="btn"  value="升序排列" onclick="toSort('sortOrder','true')"/>
									<input type="button" class="btn"  value="降序排列" onclick="toSort('sortOrder','false')"/>
								</td>
							</tr>
						</table>
					</form>
					
					<table class="table table-bordered table-striped">
						<thead>
							<tr>
								<th>编号</th>
								<th>订单号</th>
								<th>来源网站</th>
								<th style="text-align: center;">卡</th>
								<th>原币种金额</th>
								<th>实时汇率</th>
								<th>收单金额</th>
								<th style="width: 20px;text-align: center;">退</th>
								<th style="width: 20px;text-align: center;">拒</th>
								<th style="width: 20px;text-align: center;">冻</th>
								<th style="width: 20px;text-align: center;">发</th>
								<th style="width: 20px;text-align: center;">结</th>
								<th style="width: 20px;text-align: center;">危</th>
								<th style="width: 20px;text-align: center;">付</th>
								<th>发生日期</th>
								<th></th>
							</tr>
						</thead>
						<tbody>
							<s:iterator value="transactionCardList" id="show" status="seq">
							<tr>
							<td><s:property value="#show.txnNo"/></td>
							<td><s:property value="#show.txnOrder"/></td>
							<td><s:property value="#show.txnSite"/></td>
							<td style="text-align: center;"><s:property value="@common.Card@turn(#show.crdType)"/></td>
							<td style="text-align: right;"><s:text name="global.format.number"><s:param value="#show.txnLoc"/></s:text> <s:property value="#show.txnCur"/></td>
							<td style="text-align: right;"><s:text name="global.format.currency"><s:param value="#show.txnRate"/></s:text></td>
							<td style="text-align: right;"><s:text name="global.format.number"><s:param value="#show.txnAmount"/></s:text></td>
							<td style="text-align: center;"><s:if test="#show.txnRefund==0"><img src="<%=request.getContextPath() %>/image/cancel.png"  /></s:if><s:else><img src="<%=request.getContextPath() %>/image/accept.png"  /></s:else></td>
							<td style="text-align: center;"><s:if test="#show.txnRefuse==0"><img src="<%=request.getContextPath() %>/image/cancel.png"  /></s:if><s:else><img src="<%=request.getContextPath() %>/image/accept.png"  /></s:else></td>
							<td style="text-align: center;"><s:if test="#show.txnFreeze==0"><img src="<%=request.getContextPath() %>/image/cancel.png"  /></s:if><s:else><img src="<%=request.getContextPath() %>/image/accept.png"  /></s:else></td>
							<td style="text-align: center;"><s:if test="#show.txnLogic==0"><img src="<%=request.getContextPath() %>/image/cancel.png"  /></s:if><s:else><img src="<%=request.getContextPath() %>/image/accept.png"  /></s:else></td>
							<td style="text-align: center;"><s:if test="#show.txnSettle==0"><img src="<%=request.getContextPath() %>/image/cancel.png"  /></s:if><s:else><img src="<%=request.getContextPath() %>/image/accept.png"  /></s:else></td>
							<td style="text-align: center;"><s:if test="#show.txnDanger==0"><img src="<%=request.getContextPath() %>/image/cancel.png"  /></s:if><s:else><img src="<%=request.getContextPath() %>/image/accept.png"  /></s:else></td>
							<td style="text-align: center;"><s:if test="#show.txnState==0"><img src="<%=request.getContextPath() %>/image/cancel.png"  /></s:if><s:else><img src="<%=request.getContextPath() %>/image/accept.png"  /></s:else></td>
							<td><s:text name="global.format.shortdatetime"><s:param value="#show.txnDate"/></s:text></td>
							<td>
									<a href="<%=request.getContextPath()%>/transaction_show.html?txnNo=<s:property value="#show.txnNo"/>">详情</a>
							</td>
							</tr>
							</s:iterator>
						</tbody>
					</table>				
					
					<p style="float: right;">
					当前查询结果内金额汇总 : <s:text name="global.format.number"><s:param value="txnTotal"/></s:text> CNY</p>
					
					<%String paga="/"+session.getAttribute("access")+"/page.jsp"; %>
					<s:set name="pageInfo" value="pageInfo"></s:set> <jsp:include flush="true" page="<%=paga %>"></jsp:include>
					
					<div class="hero-unit" style="padding: 15px;font-size: 14px;line-height: 20px;">
						<p>
							1 . 交易流水号支持多个用逗号隔开查询多笔,同时支持模糊查询(可以输入子账户编号号或者网站编号查询某个子账户或者某个网站下的交易).
						</p>
						<p>
							2 . 退(退款状态),拒(拒付状态),冻(冻结状态),退(退款状态),发(发货状态),结(结算状态),危(风险状态),付(付款状态).
						</p>
						<p>
							3 . 卡类型 V代表VIAS,M代表MASTER.
						</p>
					</div>
					
				</div>
		</div>
		
		
		<s:action name="global_foot"  executeResult="true"></s:action>
	</div>
</body>
</html>

